package com.white.algebra.dao;

import com.white.algebra.domain.UserInfo;

import java.sql.SQLException;
import java.util.List;

public interface UserDao {

    UserInfo login(String username, String password) throws Exception;

    void register(String username, String password,String email) throws SQLException;

    List<UserInfo> findAll(int startRecord, int size, String fuzzyName) throws SQLException;

    UserInfo findById(String id) throws SQLException;

    void save(UserInfo userInfo) throws SQLException;

    int getLogNum(String fuzzyName) throws SQLException;

    void relatedRole(String userId, String roleId) throws SQLException;

    void deleteRoleById(String id, String userId) throws SQLException;
}
